"""
@Author : 合肥一元数智教育科技有限公司
@Date :  2025/6/11 14:10
@Description : python 如何连接oracle数据库
mysql   pymysql
oracle  cx_oracle

java    mysql驱动   jdbc

"""
import  cx_Oracle

connection = cx_Oracle.connect('SCOTT', 'scott', '127.0.0.1:1521/ORCL')
cur = connection.cursor()
str_sql = 'select * from EMP'
rows = cur.execute(str_sql)
print(rows)
datas = cur.fetchall()
for row in datas:
    print(row)

cur.close()
connection.close()